package xyz.xxpc.springcloud.consumer.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
public class ConsumerUserConfiguration {

    @Bean
    @LoadBalanced // Ribbon 直接实现 负载均衡 -- 实际上可以不用添加依赖 因为eureka client已经集成了
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
